import random
import math

from coordinate import Coordinate

class Food(Coordinate):
    """A base class for fruits and suggar classes."""
    def __init__(self, amount):
        Coordinate.__init__(self, random.randint(0, fieldsize[0]),
            random.randint(0, fieldsize[1]), 0)
        self.amount = amount
        self.calculate_radius()

    def calculate_radius(self):
        """Calculates the radius of the food."""
        self.radius = math.sqrt(self.amount / math.pi) * 64

    
